package bavaria.hightech.banking;

import java.io.OutputStream;
import java.util.Locale;

import bavaria.hightech.exception.WrongValueException;

public interface IBankClientView {
			
	public Account openLoanAccount(String depositor, int duration);
	
	public Account openCurrentAccount(String depositor);
		
	public long getAccountBalance(int accountNumber);
	
	/**
	 * @param accountNumber account number of the account to which the money should payed
	 * @param money Money-Object (Value and Currency) which should be banked
	 * @param reason Reason of the cash-in
	 * @return Success
	 * @throws WrongValueException
	 */
	public boolean cashInValue(int accountNumber, Money money, String reason) throws WrongValueException;
	
	/**
	 * @param accountNumber account number of the account from which the money should banked
	 * @param money Money-Object (Value and Currency) which should be banked
	 * @param reason Reason of the cash-out
	 * @return Success
	 * @throws WrongValueException
	 */
	public boolean cashOutValue(int accountNumber, Money money, String reason) throws WrongValueException;
	
	/**
	 * Method for transfering money from one account to another at the same bank
	 * @param accountNumberFrom Account Number of the account from which the money should be banked
	 * @param accountNumberTo Account Number of the account to which the money should be banked 
	 * @param money Money-Object (Value and Currency) which should be banked
	 * @return Success
	 * @throws WrongValueException
	 */
	public boolean transfer(int accountNumberFrom, int accountNumberTo, Money money, String reason) throws WrongValueException;
	
	/**
	 * Method for exporting a statement of an account
	 * @param accountNumber Account Number of the account from which a statement should be generated
	 * @param output Outputstream for buffering the statement
	 * @param mimeType MimeType which symbolises the needed output format
	 * @param sortArgument Argument how the transactions of the account should be sorted
	 */
	public void statement(int accountNumber, OutputStream output, String mimeType, String sortArgument);
	
	public String printConditions();
	
	public Locale getBankLocale();
}
